﻿
/*
NAILSUPERSTORE ® COMPANY
 
[HISTORY]
Created By  	: NGUYEN VAN TY
Created Date	: 01/03/2010
Modified By     :
Modified Date   :
Note            :

*/

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CommonTagTime.DataAccess;
using CommonTagTime.ModelObject;
namespace CommonTagTime.Business
{
    public class busaspnet_Roles
    {
        //------------------------------------------------
        //FIELD TABLE
        //------------------------------------------------

        public const string ApplicationId = "ApplicationId";
        public const string RoleId = "RoleId";
        public const string RoleName = "RoleName";
        public const string LoweredRoleName = "LoweredRoleName";
        public const string Description = "Description";
        public const string Level = "Level";
        public const string Condition = "Condition";
        public const string UpdatedDate = "UpdatedDate";
        public const string OrderBy = "OrderBy";
        public const string OrderDirection = "OrderDirection";
        public const string CurrentPage = "CurrentPage";
        public const string PageSize = "PageSize";
        public const string TotalRecords = "TotalRecords";


        private daoaspnet_Roles _objDao;
        //------------------------------------------------
        //PUBLIC
        //------------------------------------------------
        public busaspnet_Roles()
        {
            _objDao = new daoaspnet_Roles();
        }

        public aspnet_Roles GetByName(string applicationName, string roleName)
        {
            return _objDao.GetByName(applicationName, roleName);
        }
        public int GetMaxRoleLevel(string applicationName, Guid userId)
        {
            return _objDao.GetMaxRoleLevel(applicationName, userId);
        }
        public aspnet_Roles GetMaxRole(string applicationName, Guid userId)
        {
            return _objDao.GetMaxRole(applicationName, userId);
        }
    }
}

